package mx.ipn.presentacion.nomina;

import mx.ipn.presentacion.nomina.ui.*;
import mx.ipn.presentacion.ConexionConNegocios;
import com.trolltech.qt.gui.QMessageBox;
import com.trolltech.qt.gui.QApplication;
import com.trolltech.qt.gui.QTableWidgetItem;
import com.trolltech.qt.gui.QWidget;
import com.trolltech.qt.gui.QDialog;
import mx.ipn.to.*;

import java.util.*;
public class Desglose extends QDialog{
	Ui_Desglose crear;
	DescuentoTO desc;
	PercepcionTO per;
	DescuentoEmpleadoTO  descemp;
	PercepcionEmpleadoTO peremp;
	PercepcionTO[] listPercepcionTO;
	EmpleadoTO[] listEmpleadoTO;
	DescuentoTO[] listDescuentoTO;
	int id_desc;
	int id_dp;
	int tableper=-1;
	public Desglose(double sala,double infe,double por,double cf,double paso1,double paso2,double paso3,double tisr){
			crear = new Ui_Desglose();
			crear.setupUi(this);
			//rep.tableWidget.setRowCount(1);
			//rep.tableWidget.itemClicked.connect(this,"selectFactura()");
			//rep.pushButton.clicked.connect(this, "ver()");
			//rep.pushButton_2.clicked.connect(this, "buscar()");
			//rep.radioButton.clicked.connect(this,"mes()");
			//rep.radioButton_2.clicked.connect(this,"dia()");
			crear.pushButton.clicked.connect(this, "accept()");
			llena(sala,infe,por,cf,paso1,paso2,paso3,tisr);
			this.show();
	}
	public void llena(double sala,double infe,double por,double cf,double paso1,double paso2,double paso3,double tisr){
		crear.lineEdit.setText(String.valueOf(sala));
		crear.lineEdit_2.setText(String.valueOf(infe));
		crear.lineEdit_3.setText(String.valueOf(por));
		crear.lineEdit_4.setText(String.valueOf(cf));
		crear.lineEdit_5.setText(String.valueOf(paso1));
		crear.lineEdit_6.setText(String.valueOf(paso2));
		crear.lineEdit_7.setText(String.valueOf(paso3));
		crear.lineEdit_8.setText(String.valueOf(tisr));
	}
	public void accept(){
		this.dispose();
	}
	public void reject(){
		this.dispose();
	}
}